package com.chaos.eurekaproducer.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author liaopeng
 * @title: MyListener
 * @projectName eureka-producer
 * @description: 自定义事件监听器
 * @date 2021/9/24下午5:53
 */
@Component
public class MyListener implements ApplicationListener<MyEvent> {

    @Override
    public void onApplicationEvent(MyEvent event) {
        System.out.println("监听到"+event.getUser().getName());
    }
}
